#include<stdio.h>
#include<iostream>
#include<string.h>
#include <algorithm>
using namespace std;
bool sushu(int i)
{
	int j;
	if (i == 1 || i == 2)return true;
	for (j = 2; j < i; j++)if (i%j == 0)return false;
	return true;
}
int main()
{
	int m, k,count,i;
	while (cin >> m >> k)
	{
		count = 0;
		for (i = m+1;; i++)
		{
			if (sushu(i))
			{
				count++;
				if (count > 1)cout << " ";
				cout << i;
			}
			if (count == k)break;
		}
		cout << endl;
	}
	return 0;
}